Skip to content

ATL-1206, 1195, 1193, 1207, 1215, 786: Various fixes and improvements for ATL Sprint 20 #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 14, 2021

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Apr 7, 2021

@CLAassistant
Copy link

CLAassistant commented Apr 7, 2021

CLA assistant check
All committers have signed the CLA.

@kittaakos

This comment has been minimized.

@kittaakos

This comment has been minimized.

@kittaakos

This comment has been minimized.

@kittaakos
Copy link
Contributor Author

We decided to run the gRPC equivalent of arduino-cli lib list when no board is selected, or the core of the selected board is not installed. In this case, we will show the examples/libs from the user-installed libs. Otherwise, (when a board is selected and the core is installed), we run the gRPC equivalent of arduino-cli lib list --all --fqbn the:current:fqbn command.

Akos Kitta added 5 commits April 8, 2021 10:34
Show all examples:
 - when no board is selected,
 - when the core is not installed for the selected board.

Otherwise, show examples for the currently selected board only.
Only get libraries from the cores when the FQBN is defined.
Otherwise, we retrieve user installed libraries only.

Signed-off-by: Akos Kitta <[email protected]>
Like for the examples, we show all libraries if no board is selected,
or the platform for the selected board is not installed.
Otherwise, we show the libs for the current board.

Signed-off-by: Akos Kitta <[email protected]>
When running the handler for the `Sketchbook` menu, do not clone the
sketch.

Closes #297

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos kittaakos force-pushed the atl-1195--show-all-examples-when-no-board-selected branch from 9222b1f to 0b3f899 Compare April 8, 2021 08:35
@kittaakos kittaakos marked this pull request as ready for review April 8, 2021 12:10
@kittaakos kittaakos requested review from fstasi and ubidefeo April 8, 2021 12:10
@kittaakos kittaakos changed the title [WIP]: ATL-1206, 1195, 1193, 1207: Various fixes and improvements for ATL Sprint 20 [WIP]: ATL-1206, 1195, 1193, 1207, 1215: Various fixes and improvements for ATL Sprint 20 Apr 8, 2021
@kittaakos kittaakos changed the title [WIP]: ATL-1206, 1195, 1193, 1207, 1215: Various fixes and improvements for ATL Sprint 20 ATL-1206, 1195, 1193, 1207, 1215: Various fixes and improvements for ATL Sprint 20 Apr 8, 2021
@ubidefeo
Copy link

ubidefeo commented Apr 8, 2021

hi @kittaakos
I found a few issues with some of the fixes

  • ATL-1195: Show examples if no board is selected.

right now I cannot have the "no board selected" situation because of ATL-1206, so I erased the preference folder .arduinoIDE expecting the IDE to forget the last selected board, and instead of showing no board selected I got ESP 32 Dev Module automatically selected but I had not used this board in the sketch.
The board was used previously but I have no idea where it picked it from once the preferences folder was erased

  • ATL-1195: Show all libraries if no board selected.

because of the above I cannot test this one.
It will be less of a problem once a board has ever been selected, but at first launch it will still be.
I need ways to reliably recreate the first launch, with no board selected and deleting .arduinoIDE doesn't seem to do it

  • Notify user if platform/lib install was successful
    This shows the notification and it's good for now

GH-297: Fixed the open from Sketchbook handler.
This added a regression. If the sketch is already open, it will open a duplicate of it in a new window, but this will only happen the first time.
If I try again, and I already have 2 open of the same it will not open a 3rd one

  • ATL-1207: Open editor if file was added to sketch.
    works when:
  • adding to or removing a file from the Sketch folder
  • renaming a file from the Sketch folder
    does not work when:
  • copy/paste a file on Mac, as it gets "duplicated" with the filename copy.ext format. I thought it could be the space in the name but renaming an existing file adding a space reflects in the open tab changing name
  • ATL-1206: Reuse selected board for new sketches.
    works
  • ATL-1215: Updated to the 20210408 CLI.
    verified

@kittaakos
Copy link
Contributor Author

right now I cannot have the "no board selected" situation because of ATL-1206, so I erased the preference folder .arduinoIDE expecting the IDE to forget the last selected board, and instead of showing no board selected I got ESP 32 Dev Module automatically selected but I had not used this board in the sketch.

If you want to "unset" the selected board, you have to open the DevTools, write localStorage.clear() to the console, press enter, and reload the page with Ctrl/Cmd+R when the DevTools has the focus.

screencast.2021-04-08.17-26-32.mp4

@kittaakos
Copy link
Contributor Author

  • thought it could be the space in the name but renaming an existing file adding a space reflects in the open tab changing name

A sketch file cannot contain space. Your macOS-based copy/paste will result in an invalid sketch file name. So the IDE does not open that file. This behaves the same with the Java IDE. I do not think this is a bug.

@kittaakos kittaakos force-pushed the atl-1195--show-all-examples-when-no-board-selected branch from 86e46c4 to 3fc1ffc Compare April 9, 2021 09:42
@kittaakos kittaakos changed the title ATL-1206, 1195, 1193, 1207, 1215: Various fixes and improvements for ATL Sprint 20 ATL-1206, 1195, 1193, 1207, 1215, 786: Various fixes and improvements for ATL Sprint 20 Apr 9, 2021
@kittaakos kittaakos force-pushed the atl-1195--show-all-examples-when-no-board-selected branch from 8e16c7e to cdd3315 Compare April 12, 2021 09:57
@kittaakos
Copy link
Contributor Author

I found this in the logs:

root ERROR Request installed failed with error: 2 UNKNOWN: loading board data: unknown package arduino Error: 2 UNKNOWN: loading board data: unknown package arduino
    at Object.callErrorFromStatus (/Users/akos.kitta/git/arduino-ide/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/Users/akos.kitta/git/arduino-ide/node_modules/@grpc/grpc-js/build/src/client.js:176:52)
    at Object.onReceiveStatus (/Users/akos.kitta/git/arduino-ide/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/Users/akos.kitta/git/arduino-ide/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /Users/akos.kitta/git/arduino-ide/node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78
    at processTicksAndRejections (internal/process/task_queues.js:76:11)

It looks suspicious. unknown package arduino; there is no package arduino. It should be arduino:avr, arduino:samd, etc.

@silvanocerza
Copy link
Contributor

This happens when calling BoardDetails right? What's the FQBN used to make the call?

@kittaakos
Copy link
Contributor Author

This happens when calling BoardDetails right?

I thought the same, but no. lib list has the same error message as board details and this 👆 comes from lib list.

@silvanocerza
Copy link
Contributor

lib list too can accept an FQBN, that error can happen only in case the passed FQBN is malformed. Could this be caused by the changes needed to show examples in the dropdown menu even when no board is selected?

@ubidefeo
Copy link

Everything seems to work, but I'm still able to create a new Tab with a space in the name.
Shall we create an issue for it?

@kittaakos
Copy link
Contributor Author

Everything seems to work

FYI: We have an issue with the CLI, I believe. It's super easy to reproduce, wipe directories.data and start the app, after InitRequest, and the lib and platforms index updates, search does not work, for instance. We cannot propose users to auto-install cores, etc. There is a timing issue somewhere. So any new users will have this issue. We can discuss it tomorrow, online.

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos kittaakos force-pushed the atl-1195--show-all-examples-when-no-board-selected branch from 4531fd3 to 9bf2219 Compare April 14, 2021 09:05
@kittaakos
Copy link
Contributor Author

This PR is blocked by eclipse-theia/theia#9349.

Akos Kitta added 3 commits April 14, 2021 14:10
So that the IDE correctly loads the VS Code extensions.

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos kittaakos force-pushed the atl-1195--show-all-examples-when-no-board-selected branch from 9bf2219 to 90d2ba8 Compare April 14, 2021 12:10
@kittaakos
Copy link
Contributor Author

I have fixed the outstanding issues. It's ready for review.

Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and approved
thank you

@kittaakos
Copy link
Contributor Author

Thank you for the review. I am merging the changes to the main.

@kittaakos kittaakos merged commit 3240bf7 into main Apr 14, 2021
@kittaakos kittaakos deleted the atl-1195--show-all-examples-when-no-board-selected branch April 14, 2021 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants